{$CLEO .cs}

0ACD: show_text_highpriority "Loaded!" time 3000

//$Sweet_Car = 0
023C: load_special_actor 'smoke' as 1 // models 290-299
038B: load_requested_models
32@ = 0
33@ = 0
6@ = 30.0
0208: 10@ = random_float_in_ranges 70.2 130.2
0208: 11@ = random_float_in_ranges  70.2 130.2
//32@ = 10000
0208: 12@ = random_float_in_ranges  -130.2 -70.2
0208: 13@ = random_float_in_ranges  -130.2 -70.2

04C4: store_coords_to 15@ 16@ 19@ from_actor $PLAYER_ACTOR with_offset 10@ 11@ -5555.0 
04C4: store_coords_to 24@ 25@ 26@ from_actor $PLAYER_ACTOR with_offset 12@ 13@ -5555.0 
02C1: store_to 15@ 16@ 19@ ped_path_coords_closest_to  24@ 25@ 26@     
0746: set_acquaintance 4 of_actors_pedtype 8 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 9 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 10 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 11 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 12 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 13 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 14 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 15 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 16 to_actors_pedtype 23
0746: set_acquaintance 4 of_actors_pedtype 20  to_actors_pedtype 23
      

if
023D:   special_actor 1 loaded

then
jump @to 


end
0ACD: show_text_highpriority "~r~Loading Luigi's Failed!" time 3000
end_thread

:respawn 
wait 0
if
32@ >= 15000
jf @wait 
32@ = 0
:clear_reset

023C: load_special_actor 'psycho' as 1 // models 290-299   
038B: load_requested_models
Jump @to
:wait 
if 
$onmission == 0
then

0296: unload_special_actor 1
end_thread
end

jump @respawn
:to   
model.Load(#SWAT) 
model.Load(#MP5LNG) 
model.Load(#M4) 
model.Load(#DESERT_EAGLE) 
model.Load(#SHOTGSPA) 
model.Load(#BAT) 
model.Load(#AK47) 
model.Load(#MP5LNG) 
model.Load(#TEC9) 
model.Load(#SNIPER) 
model.Load(#MP5LNG) 
model.Load(#CHROMEGUN) 
model.Load(#MICRO_UZI) 
model.Load(#MP5LNG) 
model.Load(#ARMY) 

038B: load_requested_models    
0@ = actor.Create(15, #ARMY, 24@ ,25@  ,26@)
actor.Health(0@) = 1100

//0446: set_actor 0@ dismemberment_possible 0
33@ = 0      
//actor.SetWalkStyle(0@ , "player")
//actor.SetImmunities(0@,1,1,1,1,1)
02AB: set_actor 0@ immunities BP 0 FP 0 EP 0 CP 0 MP 0

077A: set_actor 0@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 8 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 23 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 7 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 20 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 6 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 9 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 10 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 11 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 12 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 14 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 13 // see ped.dat
//077A: set_actor 0@ acquaintance 4 to_actors_pedtype 15 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 16 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 24 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 25 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 6 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 5 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 4 // see ped.dat
//077A: set_actor 0@ acquaintance 4 to_actors_pedtype 23 // see ped.dat
marker.CreateAboveActor(1@, 0@)
018B: set_marker 1@ radar_mode 4
marker.SetIconSize(1@, 2)
marker.SetColor(1@, 2)
060A: create_decision_maker_type 3 store_to 28@  // decision\allowed\m_.ped files
07E5: copy_decision_maker 28@ to 29@
060B: set_actor 0@ decision_maker_to 29@
//05E2: AS_actor 0@ kill_actor $player_actor 
05DE: AS_actor 0@ walk_around_ped_path
07DD: set_actor 0@ attack_rate 89 // previously known as temper_to
02E2: set_actor 0@ weapon_accuracy_to 68
 0446: set_actor 0@ dismemberment_possible 0

actor.GiveWeaponAndAmmo(0@, microuzi, 99999)


7@ = 30.0
8@ = 30.0                         
9@ = 30.0
32@ = 0                    
:start_random
wait 0
0209: 18@ = random_int_in_ranges 0 10
if
18@ == 0 
then        
00A1: put_actor 0@ at 15@ 16@ 19@
actor.Angle(0@) = 6.5331      
actor.GiveWeaponAndAmmo(0@, ak47, 99999)
     
jump @main
end
if
18@ == 1 
then
00A1: put_actor 0@ at  24@ 25@ 26@ 
actor.Angle(0@) =  277.1979   
jump @main
end
if
18@ == 2
then          
00A1: put_actor 0@ at 15@ 16@ 19@
actor.Angle(0@) = 278.6042
actor.GiveWeaponAndAmmo(0@, sniperrifle, 99999)
jump @main
end
if
18@ == 3
then       
00A1: put_actor 0@ at 24@ 25@ 26@ 
actor.Angle(0@) = 269.6042
jump @main
end
if
18@ == 4
then     
actor.GiveWeaponAndAmmo(0@, m4, 99999)

00A1: put_actor 0@ at 15@ 16@ 19@
actor.Angle(0@) =  181.2184
jump @main
end
if
18@ == 5
then        
00A1: put_actor 0@ at  24@ 25@ 26@     
actor.Angle(0@) =  178.3072   
actor.GiveWeaponAndAmmo(0@, ak47, 99999)
 
jump @main
end
if
18@ == 6
then            
actor.GiveWeaponAndAmmo(0@, m4, 99999)
    
00A1: put_actor 0@ at 15@ 16@ 19@
actor.Angle(0@) =   180.3077
jump @main
end
if
18@ == 7
then    
actor.GiveWeaponAndAmmo(0@, deserteagle, 99999)

00A1: put_actor 0@ at  24@ 25@ 26@
actor.Angle(0@) = 269.6042
jump @main
end
if
18@ == 8
then       
00A1: put_actor 0@ at 15@ 16@ 19@
actor.Angle(0@) =   270.0254
actor.GiveWeaponAndAmmo(0@, deserteagle, 99999)

jump @main
end
if                //optional basement
18@ == 9
then         
00A1: put_actor 0@ at  15@ 16@ 19@
actor.Angle(0@) =   1.7751
actor.GiveWeaponAndAmmo(0@, shotgun, 99999)

jump @main
end
jump @start_random



:main
0208: 10@ = random_float_in_ranges 70.2 130.2
0208: 11@ = random_float_in_ranges  -70.2 -130.2

0208: 12@ = random_float_in_ranges  130.2 70.2
0208: 13@ = random_float_in_ranges  -130.2 -70.2
04C4: store_coords_to 15@ 16@ 19@ from_actor $PLAYER_ACTOR with_offset 10@ 11@ -5555.0 
04C4: store_coords_to 24@ 25@ 26@ from_actor $PLAYER_ACTOR with_offset 12@ 13@ -5555.0 
//04C4: store_coords_to 15@ 16@ 19@ from_actor $PLAYER_ACTOR with_offset -70.0 70.0 -5555.0 
//04C4: store_coords_to 24@ 25@ 26@ from_actor $PLAYER_ACTOR with_offset 70.0 -70.0 -5555.0 
02C1:  store_to 15@ 16@ 19@ car_path_coords_closest_to 24@ 25@ 26@ 

wait 0
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0

if  or
$actor_sweet == 0 
$onmission == 0
then



jump @clear_it 
end
if
8104:  not actor $PLAYER_ACTOR near_actor 0@ radius 185.0 185.0 185.0 sphere 0



then
0296: unload_special_actor 1
actor.DestroyInstantly(0@)

jump @clear_reset
end
if 
actor.Dead(0@)

then
  wait 1000
//0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0
actor.DestroyInstantly(0@)
jump @clear_reset
end
if 
0ADC:   test_cheat "debug"

then                                  
0ACB: show_styled_text "~r~Show Markers Cheat Activated!" time 3000 style 5

018B: set_marker 1@ radar_mode 2

end
:triggers_toys
if
$Sweet_Car == 1
then
6@ = 40.0
060A: create_decision_maker_type 3 store_to 28@  // decision\allowed\m_.ped files
07E5: copy_decision_maker 28@ to 31@
060B: set_actor 0@ decision_maker_to 31@
7@ = 100.0
8@ = 100.0
9@ = 100.0
end
if
$Sweet_Car == 2
then
6@ = 80.0
060A: create_decision_maker_type 3 store_to 28@  // decision\allowed\m_.ped files
07E5: copy_decision_maker 28@ to 31@
060B: set_actor 0@ decision_maker_to 31@
7@ = 200.0
8@ = 200.0
9@ = 200.0
end
if
$Sweet_Car == 3
then
6@ = 9999.0
060A: create_decision_maker_type 4 store_to 28@  // decision\allowed\m_.ped files
07E5: copy_decision_maker 28@ to 31@
060B: set_actor 0@ decision_maker_to 31@
7@ = 999999.0
8@ = 999999.0
9@ = 999999.0
end
jump @get
if
056D:   actor 0@  defined
then
:clear_it
0296: unload_special_actor 1

actor.DestroyInstantly(0@)

end
end_thread

 





:get      
0209: 17@ = random_int_in_ranges 0 3
if
17@ == 0
then
0AE1: 30@ = random_actor_near_point 3@ 4@ 5@ in_radius 6@ find_next 1 pass_deads 1

end
if
17@ == 1
then
30@ = actor.EmulateFromPlayer($PLAYER_CHAR)
end
if
17@ == 2
then

if
056D:   actor $second_player_actor  defined

then
30@ = actor.EmulateFromPlayer($second_player)
end
end
       {
:spot
if
056D:   actor 30@  defined
then
089F: get_actor 30@ pedtype_to 20@
if  and
not 20@ == 17
not 20@ == 23
then
if
0364:   actor 0@ spotted_actor 30@
then

05E2: AS_actor 0@ kill_actor 30@
end    
end
end  }
if and
0364:   actor 0@ spotted_actor $PLAYER_ACTOR
0104:   actor $PLAYER_ACTOR near_actor 0@ radius 30.0 30.0 30.0 sphere 0

then
018B: set_marker 1@ radar_mode 2

end 
if
056D:   actor $second_player_actor  defined
then
if and
0364:   actor 0@ spotted_actor $second_player_actor
0104:   actor $second_player_actor near_actor 0@ radius  30.0 30.0 30.0 sphere 0
then
018B: set_marker 1@ radar_mode 2
end
end
if 
056D:   actor 30@  defined
then
if and
32@ > 12000
0364:   actor 0@ spotted_actor 30@
0104:   actor 30@ near_actor 0@ radius  7@ 8@ 9@ sphere 0
then
089F: get_actor 30@ pedtype_to 20@
if  and
not 20@ == 17
not 20@ == 23
then                                    
32@  = 0                               //NEW!!!!
//0687: clear_actor 0@ task
//0792: disembark_instantly_actor 0@

05E2: AS_actor 0@ kill_actor 30@

end
end
end     
if  and
$Sweet_Car == 3
056D:   actor 30@  defined
then
if 
32@ > 6000

//0364:   actor 0@ spotted_actor 30@
//0104:   actor 30@ near_actor 0@ radius  7@ 8@ 9@ sphere 0
then
089F: get_actor 30@ pedtype_to 20@
if  and
not 20@ == 17
not 20@ == 23
then
32@  = 0                               //NEW!!!!
//0687: clear_actor 0@ task
//0792: disembark_instantly_actor 0@

05E2: AS_actor 0@ kill_actor 30@

end
end
end       
  
if and
056D:   actor 0@  defined 
33@ >= 30000   
then                     
if        
075C:   marker 1@ enabled

then
marker.Disable(1@)
end
actor.DestroyInstantly(0@)
33@ = 0 
32@ = 10000
wait 1000
jump @respawn 
end


:bomb
if and 
$actor_sweet == 42819
056D:   actor 30@  defined
then
if and
82D8: not  actor 30@ current_weapon == 1
0364:   actor 0@ spotted_actor 30@
0105:   actor 30@ near_actor 0@ radius 3.0 3.0 3.0 sphere 0 on_foot
then
089F: get_actor 30@ pedtype_to 21@
if  and
not 21@ == 17
not 21@ == 23
then
//0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0
//05BE: AS_actor 30@ die
05BE: AS_actor 0@ die

actor.DestroyInstantly(0@)
32@ = 0

jump @respawn 
end
end
end
//:go_
if
33@ > 25000
then
33@ = 0
//078F: AS_actor 0@ climb 1
//05DE: AS_actor 0@ walk_around_ped_path
end
if 
$actor_sweet == 0 
then

jump @goto
end
jump @main

:goto
0296: unload_special_actor 1
0A93: end_custom_thread
0A92: create_custom_thread "battle_maps\airport_luigi.cs"

end_thread